import config from "@/config"
import http from "@/utils/request"

export default {
	//销售单
	contract:{
		list: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/lists`,
			name: "获取销售单列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/edit`,
			name: "修改销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/add`,
			name: "添加销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/delete`,
			name: "删除销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/detail`,
			name: "销售单详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		check: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/checkStatus`,
			name: "审核销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		uncheckStatus: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/uncheckStatus`,
			name: "审核销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        cancel: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/cancel`,
			name: "作废销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        detailList:{
            url: `${config.API_URL}/adminapi/shop.contractOrder/goodsLists`,
			name: "获取销售单下的产品",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
		import: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/import`,
			name: "销售单 -- 导入",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		batchSend: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/batchSend`,
			name: "批量发货",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		batchTicket: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/batchTicket`,
			name: "批量开票",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        batchReceive: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/batchReceive`,
			name: "批量收款",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        batchPrint: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/batchPrint`,
			name: "批量打印",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        print: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/print_order`,
			name: "标签打印",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
}
